package cn.bigfire.compiler.mytest.lexer01;


public enum TokenType {
    //声明语句lexer
    ID(1, null, "标识符")
    , Number(2, null, "数字")
    , Assignment(3, "=", "等号")
    , SemiColon(4, ";", "分号")
    //算数
    , Plus(5, "+", "加")
    , Minus(6, "-", "减")
    , Star(7, "*", "乘")
    , Slash(8, "/", "除")
    //逻辑
    , LeftParen(9, "(", "左括号")
    , RightParen(10, ")", "右括号")
    , GT(12, ">", "大于")
    , GE(13, ">=", "大于等于")
    ;


    private int type;
    private String span;
    private String name;

    private TokenType(int type, String span, String name) {
        this.type = type;
        this.span = span;
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public String getSpan() {
        return span;
    }

    public String getName() {
        return name;
    }
}
